<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Vue basic</title>
    <script src="https://unpkg.com/vue@next"></script>
</head>

<body>
    <div id="app">
        <div>{{plusCount}}</div>
    </div>
    <script>
        const { createApp, ref, computed, reactive, toRefs, toRef } = Vue;
        const App = {
            setup() {
                const count = ref(1);

                const plusCount = computed({
                    get: function () {
                        console.log("===get===");
                        console.log("count.value", count.value);
                        return count.value + 1;
                    },
                    set: function (val) {
                        count.value = val + 2;
                    }
                });

                plusCount.value = 3;
                console.log("count.value==", count.value);
                console.log("count.value==", count.value);
                return {
                    plusCount
                }
            }
        }

        createApp(App).mount("#app")
    </script>
</body>

</html>